Skip to content

change variables since settings.main used by manage.py uses DJANGO_*#66

Merged
rolandgeider merged 1 commit into
wger-project:masterfrom
ecstt:from-source-edit
Jul 17, 2026
Merged

change variables since settings.main used by manage.py uses DJANGO_*#66
rolandgeider merged 1 commit into
wger-project:masterfrom
ecstt:from-source-edit

Conversation

@ecstt

@ecstt ecstt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

About installing from source:
the minimal example suggests in the env:

# Application
MEDIA_ROOT=/home/wger/media
STATIC_ROOT=/home/wger/static

when using a different user than the suggested new 'wger' user and importing the wger.env for bootstrap command with
set -a; . /home/<non_default_folder>/wger.env; set +a
then checking the env:
manage.py diffsettings | grep MEDIA_ROOT
shows the value of 'MEDIA_ROOT' (and 'STATIC_ROOT') as not changed from the default used in settings.main.

In settings.main MEDIA_ROOT and STATIC_ROOT are:

MEDIA_ROOT = env.str('DJANGO_MEDIA_ROOT', '/home/wger/media')
STATIC_ROOT = env.str('DJANGO_STATIC_ROOT', '/home/wger/static')

so DJANGO_* is required to overwrite the values.
Running python manage.py collectstatic without this change in the env gave me an error since it tried to access the non existent /home/wger folder.

@rolandgeider
rolandgeider merged commit 1e381c5 into wger-project:master Jul 17, 2026
@rolandgeider

Copy link
Copy Markdown
Member

merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants